#pragma once

#include "MysqlConn.h"
#include "afxwin.h"
#include "afxcmn.h"

#include "../TBitmap/PictureEx.h"

// CLogonDlg dialog

class CLogonDlg : public CDialog
{
	DECLARE_DYNAMIC(CLogonDlg)

public:
	CLogonDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CLogonDlg();

public:
	void InitMysql(void);
private:
	CMysqlConn  m_oMysql;
	HBITMAP m_hBitmap;
	HBITMAP m_hBitmapUserPic;

	CRect m_rectGGao;
	CRect m_rectUserPic;
// Dialog Data
	enum { IDD = IDD_DIALOG_LOGON };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnPaint();
protected:
	CComboBox m_ctrlBoxAccount;
//public:
	CImageList  m_strImageList;
	CComboBoxEx m_ctrlExBoxDatabase;
	//CComboBox m_ctrlExBoxDatabase;
	CEdit m_ctrlEditPasswd;
public:
	afx_msg void OnEnSetfocusEditLongonPasswd();
	afx_msg void OnEnKillfocusEditLongonPasswd();
	//CStatic m_oShowTopGGao;
	CPictureEx m_oShowTopGGao;
	//CStatic m_oUserPicture;
	CPictureEx m_oUserPicture;
	afx_msg void OnStnClickedStaticTopPicture();
	afx_msg void OnStnDblclickStaticTopPicture();
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	CProgressCtrl m_oLogonCtrlProg;
};
